<h1>Listing users</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Lastname</th>
    <th>Photo</th>
    <th>Bio</th>
    <th>Email</th>
    <th>Password</th>
    <th>Nickname</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @users.each do |user| %>
  <tr>
    <td><%= user.name %></td>
    <td><%= user.lastname %></td>
    <td><%= user.photo %></td>
    <td><%= user.bio %></td>
    <td><%= user.email %></td>
    <td><%= user.password %></td>
    <td><%= user.nickname %></td>
    <td><%= link_to 'Show', user %></td>
    <td><%= link_to 'Edit', edit_user_path(user) %></td>
    <td><%= link_to 'Destroy', user, confirm: 'Are you sure?', method: :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New User', new_user_path %>
